<template>
  <view class="bagua-relation cm-text-center" :style="[style.font]">
    <view class="bagua-relation-wrapper">
      <view v-for="(item, index) in model" :key="index">
        <view class="cm-bold app-alert-color cm-margin-right-5" v-if="item.type === 'key'">{{ item.text }}</view>
        <view class="cm-flex cm-flex-a-center cm-margin-right-5" v-else-if="item.type === 'obj'">
          <view>{{ item.obj.description }}</view>
          <bagua-element :size="size" :bagua="item.obj" yinyang wuxing></bagua-element>
        </view>
        <view class="cm-margin-right-5" v-else>{{ item.text }}</view>
      </view>
    </view>
    <view class="bagua-relation-header" :style="[style.header]">
      <cm-icon :size="size" type="cuIcon-title"></cm-icon>
    </view>
  </view>
</template>

<script src="./baguaRelation.js"></script>

<style lang="stylus">
@import './baguaRelation.styl'
</style>
